<html>
<head>
    <meta charset="utf-8">
    <#include "../config.ftl"/>
    <script src="/static/js/addApi.js"></script>
</head>
<body>
<div class="layui-layout-body">
<form class="layui-form ayui-form-pane" action="" >
    <input hidden name="id" value="<#if apiInfo?exists>${apiInfo.id}</#if>"/>
    <div class="layui-form-item">
        <label class="layui-form-label">Api路径</label>
        <div class="layui-input-block" >
            <input type="text" name="apiPath" required lay-verify="required"
                   placeholder="/api/*"
                   value="<#if apiInfo?exists>${apiInfo.apiPath}</#if>" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">服务器地址</label>
        <div class="layui-input-block" >
            <input type="text" name="orgHost" required lay-verify="required" value="<#if apiInfo?exists>${apiInfo.orgHost}</#if>" autocomplete="off" class="layui-input">
            <div class="layui-form-mid layui-word-aux">(请携带端口号)</div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">服务器路径</label>
        <div class="layui-input-block">
            <input type="text" name="orgUrl" required lay-verify="required" value="<#if apiInfo?exists>${apiInfo.orgUrl}</#if>" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="addAPI">提交</button>
        </div>
    </div>
</form>
</div>
</body>
</html>